<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 后代选择器 */
      #box span{
        color: red;
      }

      /* 子选择器 */
      #box>span{
        background-color: pink;
      }

      /* 并集选择器 */
      .c1,p{
        color: red;
      }
      /* 交集选择器  标签<p> and class="c1" */
      p.c1{
        color: blue;
      }

      #item+li{
        color: blue;
      }    
      
      *{
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div id="box">
      <span>box的儿子</span>
      <p>
        <span> box的孙子</span>
      </p>
    </div>

     <h1 class="c1">aaaaaaaaa</h1>
     <p class="c1">bbbbbbbbb</p>
     <p>ccccccccc</p>

     <ul>
       <li id="item">data1</li>
       <li>data2</li>
       <li>data3</li>
     </ul>
  </body>
</html>
